* THIS FILE COMPUTES MISCELLANEOUS RESULTS THAT ARE DESCRIBED IN THE PAPER

set more off
clear
capture log close

* SET DIRECTORY HERE 
cd "C:\Users\mitch\Dropbox\BLW\POP\Searching for a Bright Line\Searching for a Bright Line replication materials" 
use "Data/BLW_Public_Waves3456.dta", clear

log using "Logs/auxiliary tests.log", replace text

numlabel, add

tab wave

recode perf_misconduct-perf_investigations (1=0) (2=0) (3=1) (4=1) (5=.)
label value perf_misconduct-perf_investigations statementlabel

recode imp_misconduct-imp_investigations (0=0) (1=0) (2=1) (3=1)
label value imp_misconduct-imp_investigations statementlabel

gen trump = approve_trmp
recode trump (2 = 1) (3 = 0) (4 = 0) (8 = .) (9 = .)
label define trumpLabel 0 "Not approve Trump" 1 "Approve Trump"
label value trump trumpLabel

tab wave 
recode wave (1=0) (2=0) (3=1) (4=0) (5=0) (6=0), gen(wave3)
recode wave (1=0) (2=0) (3=0) (4=1) (5=0) (6=0), gen(wave4)
recode wave (1=0) (2=0) (3=0) (4=0) (5=1) (6=0), gen(wave5)
recode wave (1=0) (2=0) (3=0) (4=0) (5=0) (6=1), gen(wave6)
gen wave4_trump=wave4*trump


* COMPARE IMPORTANCE BY TRUMP APPROVAL
svyset [pweight=weight]
svy: regress imp_misconduct trump if(wave==3)
svy: regress imp_private_gain trump if(wave==3) 
svy: regress imp_monitor_opponents trump if(wave==3) 
svy: regress imp_equal_rights trump if(wave==3) 
svy: regress imp_journalists trump if(wave==3) 
svy: regress imp_private_violence trump if(wave==3) 
svy: regress imp_free_speech trump if(wave==3) 
svy: regress imp_patriotism trump if(wave==3) 
svy: regress imp_foreign_influence trump if(wave==3) 
svy: regress imp_ban_ideology trump if(wave==3) 
svy: regress imp_voting_rights trump if(wave==3) 
svy: regress imp_votes_impact trump if(wave==3) 
svy: regress imp_election_fraud trump if(wave==3) 
svy: regress imp_expand_executive trump if(wave==3) 
svy: regress imp_legislature_check trump if(wave==3) 
svy: regress imp_judiciary_check trump if(wave==3) 
svy: regress imp_judicial_ind trump if(wave==3) 
svy: regress imp_participation trump if(wave==3) 
svy: regress imp_funds_transparent trump if(wave==3) 
svy: regress imp_contributions trump if(wave==3) 
svy: regress imp_opinions trump if(wave==3) 
svy: regress imp_districts trump if(wave==3) 
svy: regress imp_common_und trump if(wave==3) 
svy: regress imp_compromise trump if(wave==3) 
svy: regress imp_candidates_disclose trump if(wave==3) 
svy: regress imp_protest trump if(wave==3) 
svy: regress imp_investigations trump if(wave==3) 



* COMPARE WAVE 3 --> WAVE 4 CHANGES BY TRUMP APPROVAL
svyset [pweight=weight]
svy: regress perf_misconduct            wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_private_gain          wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_monitor_opponents     wave4_trump wave4 trump if(wave==3 | wave==4)  
svy: regress perf_equal_rights          wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_journalists           wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_private_violence      wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_free_speech           wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_patriotism            wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_foreign               wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_ban_ideology          wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_voting_rights         wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_votes_impact          wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_election_fraud        wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_expand_executive      wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_legislature_check     wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_judiciary_check       wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_judicial_ind          wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_participation         wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_funds_transparent     wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_contributions         wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_opinions              wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_districts             wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_common_und            wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_compromise            wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_candidates_disclose   wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_protest               wave4_trump wave4 trump if(wave==3 | wave==4) 
svy: regress perf_investigations        wave4_trump wave4 trump if(wave==3 | wave==4) 
 

* COMPARE WAVE 5 --> WAVE 6 CHANGES FOR RESPONDENTS WHO APPROVE OF TRUMP
svyset [pweight=weight]
svy: regress perf_misconduct wave6          if((wave==5 | wave==6) & trump==1) 
svy: regress perf_private_gain wave6        if((wave==5 | wave==6) & trump==1) 
svy: regress perf_monitor_opponents wave6   if((wave==5 | wave==6) & trump==1) 
svy: regress perf_equal_rights wave6        if((wave==5 | wave==6) & trump==1) 
svy: regress perf_journalists wave6         if((wave==5 | wave==6) & trump==1) 
svy: regress perf_private_violence wave6    if((wave==5 | wave==6) & trump==1) 
svy: regress perf_free_speech wave6         if((wave==5 | wave==6) & trump==1) 
svy: regress perf_patriotism wave6          if((wave==5 | wave==6) & trump==1) 
svy: regress perf_foreign wave6             if((wave==5 | wave==6) & trump==1) 
svy: regress perf_ban_ideology wave6        if((wave==5 | wave==6) & trump==1) 
svy: regress perf_voting_rights wave6       if((wave==5 | wave==6) & trump==1) 
svy: regress perf_votes_impact wave6        if((wave==5 | wave==6) & trump==1) 
svy: regress perf_election_fraud wave6      if((wave==5 | wave==6) & trump==1) 
svy: regress perf_expand_executive wave6    if((wave==5 | wave==6) & trump==1) 
svy: regress perf_legislature_check wave6   if((wave==5 | wave==6) & trump==1) 
svy: regress perf_judiciary_check wave6     if((wave==5 | wave==6) & trump==1) 
svy: regress perf_judicial_ind wave6        if((wave==5 | wave==6) & trump==1) 
svy: regress perf_participation wave6       if((wave==5 | wave==6) & trump==1) 
svy: regress perf_funds_transparent wave6   if((wave==5 | wave==6) & trump==1) 
svy: regress perf_contributions wave6       if((wave==5 | wave==6) & trump==1) 
svy: regress perf_opinions wave6            if((wave==5 | wave==6) & trump==1) 
svy: regress perf_districts wave6           if((wave==5 | wave==6) & trump==1) 
svy: regress perf_common_und wave6          if((wave==5 | wave==6) & trump==1) 
svy: regress perf_compromise wave6          if((wave==5 | wave==6) & trump==1) 
svy: regress perf_candidates_disclose wave6 if((wave==5 | wave==6) & trump==1) 
svy: regress perf_protest wave6             if((wave==5 | wave==6) & trump==1) 
svy: regress perf_investigations wave6      if((wave==5 | wave==6) & trump==1) 


* COMPARE WAVE 5 --> WAVE 6 CHANGES FOR RESPONDENTS WHO DISAPPROVE OF TRUMP
svyset [pweight=weight]
svy: regress perf_misconduct wave6          if((wave==5 | wave==6) & trump==0) 
svy: regress perf_private_gain wave6        if((wave==5 | wave==6) & trump==0) 
svy: regress perf_monitor_opponents wave6   if((wave==5 | wave==6) & trump==0) 
svy: regress perf_equal_rights wave6        if((wave==5 | wave==6) & trump==0) 
svy: regress perf_journalists wave6         if((wave==5 | wave==6) & trump==0) 
svy: regress perf_private_violence wave6    if((wave==5 | wave==6) & trump==0) 
svy: regress perf_free_speech wave6         if((wave==5 | wave==6) & trump==0) 
svy: regress perf_patriotism wave6          if((wave==5 | wave==6) & trump==0) 
svy: regress perf_foreign wave6             if((wave==5 | wave==6) & trump==0) 
svy: regress perf_ban_ideology wave6        if((wave==5 | wave==6) & trump==0) 
svy: regress perf_voting_rights wave6       if((wave==5 | wave==6) & trump==0) 
svy: regress perf_votes_impact wave6        if((wave==5 | wave==6) & trump==0) 
svy: regress perf_election_fraud wave6      if((wave==5 | wave==6) & trump==0) 
svy: regress perf_expand_executive wave6    if((wave==5 | wave==6) & trump==0) 
svy: regress perf_legislature_check wave6   if((wave==5 | wave==6) & trump==0) 
svy: regress perf_judiciary_check wave6     if((wave==5 | wave==6) & trump==0) 
svy: regress perf_judicial_ind wave6        if((wave==5 | wave==6) & trump==0) 
svy: regress perf_participation wave6       if((wave==5 | wave==6) & trump==0) 
svy: regress perf_funds_transparent wave6   if((wave==5 | wave==6) & trump==0) 
svy: regress perf_contributions wave6       if((wave==5 | wave==6) & trump==0) 
svy: regress perf_opinions wave6            if((wave==5 | wave==6) & trump==0) 
svy: regress perf_districts wave6           if((wave==5 | wave==6) & trump==0) 
svy: regress perf_common_und wave6          if((wave==5 | wave==6) & trump==0) 
svy: regress perf_compromise wave6          if((wave==5 | wave==6) & trump==0) 
svy: regress perf_candidates_disclose wave6 if((wave==5 | wave==6) & trump==0) 
svy: regress perf_protest wave6             if((wave==5 | wave==6) & trump==0) 
svy: regress perf_investigations wave6      if((wave==5 | wave==6) & trump==0) 


  
  
clear
use "Data/BLW_Expert_Waves123456.dta", clear


recode perf_misconduct-perf_investigations (1=0) (2=0) (3=1) (4=1) (5=.)
label value perf_misconduct-perf_investigations statementlabel

tab wave

recode wave (1=1) (2=0) (3=0) (4=0) (5=0) (6=0), gen(wave1) 
recode wave (1=0) (2=1) (3=0) (4=0) (5=0) (6=0), gen(wave2)
recode wave (1=0) (2=0) (3=0) (4=0) (5=0) (6=1), gen(wave6)

gen weight=1


* COMPARES EXPERT PERFORMANCE EVALUATIONS FROM INITIAL WAVE FOR STATEMENT (1 OR 2) TO WAVE 6
svyset [pweight=weight]
svy: regress perf_misconduct wave6           if(wave==1 | wave==6) 
svy: regress perf_private_gain wave6         if(wave==1 | wave==6) 
svy: regress perf_monitor_opponents wave6    if(wave==1 | wave==6) 
svy: regress perf_equal_rights wave6         if(wave==1 | wave==6) 
svy: regress perf_journalists wave6          if(wave==1 | wave==6) 
svy: regress perf_private_violence wave6     if(wave==1 | wave==6) 
svy: regress perf_free_speech wave6          if(wave==1 | wave==6) 
svy: regress perf_patriotism wave6           if(wave==1 | wave==6) 
svy: regress perf_foreign wave6              if(wave==1 | wave==6) 
svy: regress perf_ban_ideology wave6         if(wave==1 | wave==6) 
svy: regress perf_voting_rights wave6        if(wave==1 | wave==6) 
svy: regress perf_votes_impact wave6         if(wave==1 | wave==6) 
svy: regress perf_election_fraud wave6       if(wave==1 | wave==6) 
svy: regress perf_expand_executive wave6     if(wave==1 | wave==6) 
svy: regress perf_legislature_check wave6    if(wave==1 | wave==6) 
svy: regress perf_judiciary_check wave6      if(wave==1 | wave==6) 
svy: regress perf_judicial_ind wave6         if(wave==1 | wave==6) 
svy: regress perf_participation wave6        if(wave==2 | wave==6) 
svy: regress perf_funds_transparent wave6    if(wave==2 | wave==6) 
svy: regress perf_contributions wave6        if(wave==2 | wave==6) 
svy: regress perf_opinions wave6             if(wave==2 | wave==6) 
svy: regress perf_districts wave6            if(wave==2 | wave==6) 
svy: regress perf_common_und wave6           if(wave==2 | wave==6) 
svy: regress perf_compromise wave6           if(wave==2 | wave==6) 
svy: regress perf_candidates_disclose wave6  if(wave==2 | wave==6) 
svy: regress perf_protest wave6              if(wave==2 | wave==6) 
svy: regress perf_investigations wave6       if(wave==2 | wave==6) 



* GENERATE DATA TO COMPUTE CORRELATION BETWEEN WAVE 3 IMPORTANCE FOR EXPERTS AND PUBLIC

use "Data/BLW_Public_Waves3456.dta", clear

recode imp_misconduct-imp_investigations (0=0) (1=0) (2=1) (3=1) 
tabstat imp_misconduct-imp_investigations if (wave==3) [aw=weight], format(%8.2f) col(statistics) la(25) var(25)

use "Data/BLW_Expert_Waves123456.dta", clear

recode imp_misconduct-imp_investigations (0=0) (1=0) (2=1) (3=1) 
tabstat imp_misconduct-imp_investigations if (wave==3), format(%8.2f) col(statistics) la(25) var(25)

log close

